The stack level at which the objects are collected.
The index of a specific object on the stack to return. If omitted, the entire stack at the given level is returned as a table.
Example debug.getstack returning a table.
This code sample will print all of the objects on the calling function’s stack.
Example debug.getstack returning a singluar object.
This code sample will print a single object that’s on the calling function’s stack.